<template>
    <button @click="geolocation.getLocation(showPosition, showErr, options)">获取精确定位信息</button>
</template>
<script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>
<script>
var geolocation = new qq.maps.Geolocation("your key", "myapp");
const showPosition=>(position) {
          console.log(position);
        };
        setup(){
          return {
            geolocation,showPosition
          }
        }
</script>